import React from 'react'
import PageLayout from './layout'
import { ConfigProvider } from 'antd'
import useConfigStore from './store/config'
import zhCN from 'antd/locale/zh_CN'
import 'dayjs/locale/zh-cn'

const App: React.FC = () => {
  const theme = useConfigStore((state) => state.themeConfig)

  return (
    <ConfigProvider
      theme={{
        algorithm: theme.algorithm,
        // token: {
        //   colorPrimary: theme.primaryColor,
        // },
      }}
      locale={zhCN}
    >
      <PageLayout />
    </ConfigProvider>
  )
}

export default App
